<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../js/vue.js"></script>
</head>
<body>
  <div id="app">
    <h2>{{message}}</h2>
    <cpn></cpn>
  </div>
</body>
<template id="cpn">
  <div>
    <h3>{{message}}</h3>    
  </div>
</template>
<script>
  const cpn = {
    template: '#cpn',
    data() {
      return {
        message: 'hhahah',
      };
    },
  }
  const app = new Vue({
    el: '#app',
    data: {
      message:'你好'
    },
    components:{
      cpn
    },
  });
</script>
</html>